package com.alibaba.citrus.ots.unified.inventory.contants;

import java.util.Arrays;
import java.util.Objects;

public enum AllocateCompareEnum {

    //code("调拨单业务单号", "code"),
    outAllocateOrderId("订单编号", "outAllocateOrderId"),
    //lineNo("订单行号", "lineNo"),
    scItemCode("物料编码", "scItemCode"),
    confirmQuantity("确认数量", "confirmQuantity"),
    shipQuantity("出库数量", "shipQuantity"),
    receiveQuantity("到货数量", "receiveQuantity"),
    //createTime("创建时间", "createTime"),
    shipTime("出库日期", "shipTime"),
    amount("折前总金额", "amount"),
    docDate("单据日期", "docDate"),
    deliveryQuantity("交货单数量", "deliveryQuantity"),
    notIssuedQuantity("未走量", "notIssuedQuantity"),
    transQuantity("在途量", "transQuantity"),
    giftQuantity("赠品数量", "giftQuantity"),
    price("原始单价", "price"),
    deliveryAmt("交货单折前金额", "deliveryAmt"),
    deliveryDiscountAmt("交货单折后金额", "deliveryDiscountAmt"),
    shippedAmt("出库折前金额", "shippedAmt"),
    shippedDiscountAmt("出库折后金额", "shippedDiscountAmt"),
    outAllocateOrderLineId("订单行号", "outAllocateOrderLineId"),
    quantity("销售订单数量", "quantity"),
//    addressCode("送达方", "addressCode"),
    shipFactoryCode("发货仓库", "shipFactoryCode"),
    confirmDate("确认日期", "confirmDate");
    //deliveryOrderNo("交货单号", "deliveryOrderNo");

    private String label;
    private String value;

    AllocateCompareEnum(String label, String value) {
        this.label = label;
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static AllocateCompareEnum of(String value) {
        return Arrays.stream(AllocateCompareEnum.values()).filter(source -> Objects.equals(value, source.getValue())).findFirst().orElse(null);
    }

}